__author__ = 'el_even'

from random import randint


class MovieData(object):
    """
    This class generates movie data
    """

    def __init__(self, title='', imdb_id='', year='', aka=''):
        self.title = title
        self.imdb_id = imdb_id
        self.year = year
        self.aka = aka

    video_type = ["Movie", "Music video", "Cartoon", "Documentary video"]
    movie_title = "%s # %s" % (video_type[randint(0, len(video_type)-1)], randint(10, 99))

    @classmethod
    def valid_info(cls):
        return cls(title=MovieData.movie_title,
                   imdb_id="%s" % randint(10000, 99999),
                   year="%s" % randint(1890, 2014),
                   aka="Other\nMovie\nNames")

    @classmethod
    def invalid_info(cls):
        return cls(title="Bad %s" % MovieData.movie_title,
                   imdb_id="%s" % randint(1, 999999),
                   # year="%s" % randint(1890, 2014),  # invalidation
                   aka="Other\nMovie\nNames")
